//
//  main.cpp
//  Unfriendly
//
//  Created by 刘 振兆 on 12-4-30.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#include <iostream>
#include <cmath>
#include <map>
#include <vector>
using namespace std;
static vector<int64_t> prime;
void get_prime(int max_number)
{
	int *table = new int[max_number + 1];
    
	memset(table, -1, sizeof(int) * (max_number + 1));
    
	table[0] = table[1] = 0;
    
	prime.clear();
    
	for(int i = 2;i<max_number ;i++)
	{
		if(table[i])
		{
			prime.push_back(i);
			for(int j = i * i;j<max_number;j+=i)
			{
				table[j] = 0;
			}
		}
	}
    
	delete [] table;
}

int get_prime_factor(int64_t number, map<int64_t , int64_t> &factor)
{
	double squre_root = sqrt(1.0 * number);
    
	factor.clear();
    
	int ret = 0;
	for(int i = 0;prime[i] < squre_root + 1;)
	{
		if(number % prime[i] == 0)
		{
			ret ++;
			factor[prime[i]] ++;
			number /= prime[i];
		}
		else
			i++;
	}
    
	return ret;
}
int main (int argc, const char * argv[])
{

    int64_t unfriendlyCount = 0;
    int64_t friendlyCount = 0;
    cin>>unfriendlyCount;
    cin>>friendlyCount;
    int64_t *numbers = new int64_t[unfriendlyCount];
    for (int64_t i=0; i<unfriendlyCount; i++) {
        cin>>numbers[i];
        //cout<<numbers[i]<<" ";
    }
    
    
    
    int64_t count = 0;
    int mark;
    int64_t a,b;
    for (int64_t i=1; i<=friendlyCount ; i++) {
        if (friendlyCount % i == 0) {
            a = i;
            b = friendlyCount / a;
            if (a > b) {
                break;
            }
            mark = 1;
            for (int64_t j=0; j<unfriendlyCount; j++) {
                if (numbers[j] % a == 0) {
                    mark = 0;
                    break;
                }
            }
            
            if (mark == 1) {
                count ++;
            }
            
            mark = 1;
            for (int64_t j=0; j<unfriendlyCount; j++) {
                if (numbers[j] % b == 0) {
                    mark = 0;
                    break;
                }
            }
            
            if (mark == 1) {
                count ++;
            }
            
        }
    }
    
    
    cout<<count<<endl;
    return 0;
}

